# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Transcoder.V1beta1.Model.JobConfig do
  @moduledoc """
  Job configuration

  ## Attributes

  *   `adBreaks` (*type:* `list(GoogleApi.Transcoder.V1beta1.Model.AdBreak.t)`, *default:* `nil`) - List of ad breaks. Specifies where to insert ad break tags in the output manifests.
  *   `editList` (*type:* `list(GoogleApi.Transcoder.V1beta1.Model.EditAtom.t)`, *default:* `nil`) - List of `Edit atom`s. Defines the ultimate timeline of the resulting file or manifest.
  *   `elementaryStreams` (*type:* `list(GoogleApi.Transcoder.V1beta1.Model.ElementaryStream.t)`, *default:* `nil`) - List of elementary streams.
  *   `inputs` (*type:* `list(GoogleApi.Transcoder.V1beta1.Model.Input.t)`, *default:* `nil`) - List of input assets stored in Cloud Storage.
  *   `manifests` (*type:* `list(GoogleApi.Transcoder.V1beta1.Model.Manifest.t)`, *default:* `nil`) - List of output manifests.
  *   `muxStreams` (*type:* `list(GoogleApi.Transcoder.V1beta1.Model.MuxStream.t)`, *default:* `nil`) - List of multiplexing settings for output streams.
  *   `output` (*type:* `GoogleApi.Transcoder.V1beta1.Model.Output.t`, *default:* `nil`) - Output configuration.
  *   `overlays` (*type:* `list(GoogleApi.Transcoder.V1beta1.Model.Overlay.t)`, *default:* `nil`) - List of overlays on the output video, in descending Z-order.
  *   `pubsubDestination` (*type:* `GoogleApi.Transcoder.V1beta1.Model.PubsubDestination.t`, *default:* `nil`) - Destination on Pub/Sub.
  *   `spriteSheets` (*type:* `list(GoogleApi.Transcoder.V1beta1.Model.SpriteSheet.t)`, *default:* `nil`) - List of output sprite sheets.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :adBreaks => list(GoogleApi.Transcoder.V1beta1.Model.AdBreak.t()) | nil,
          :editList => list(GoogleApi.Transcoder.V1beta1.Model.EditAtom.t()) | nil,
          :elementaryStreams =>
            list(GoogleApi.Transcoder.V1beta1.Model.ElementaryStream.t()) | nil,
          :inputs => list(GoogleApi.Transcoder.V1beta1.Model.Input.t()) | nil,
          :manifests => list(GoogleApi.Transcoder.V1beta1.Model.Manifest.t()) | nil,
          :muxStreams => list(GoogleApi.Transcoder.V1beta1.Model.MuxStream.t()) | nil,
          :output => GoogleApi.Transcoder.V1beta1.Model.Output.t() | nil,
          :overlays => list(GoogleApi.Transcoder.V1beta1.Model.Overlay.t()) | nil,
          :pubsubDestination => GoogleApi.Transcoder.V1beta1.Model.PubsubDestination.t() | nil,
          :spriteSheets => list(GoogleApi.Transcoder.V1beta1.Model.SpriteSheet.t()) | nil
        }

  field(:adBreaks, as: GoogleApi.Transcoder.V1beta1.Model.AdBreak, type: :list)
  field(:editList, as: GoogleApi.Transcoder.V1beta1.Model.EditAtom, type: :list)
  field(:elementaryStreams, as: GoogleApi.Transcoder.V1beta1.Model.ElementaryStream, type: :list)
  field(:inputs, as: GoogleApi.Transcoder.V1beta1.Model.Input, type: :list)
  field(:manifests, as: GoogleApi.Transcoder.V1beta1.Model.Manifest, type: :list)
  field(:muxStreams, as: GoogleApi.Transcoder.V1beta1.Model.MuxStream, type: :list)
  field(:output, as: GoogleApi.Transcoder.V1beta1.Model.Output)
  field(:overlays, as: GoogleApi.Transcoder.V1beta1.Model.Overlay, type: :list)
  field(:pubsubDestination, as: GoogleApi.Transcoder.V1beta1.Model.PubsubDestination)
  field(:spriteSheets, as: GoogleApi.Transcoder.V1beta1.Model.SpriteSheet, type: :list)
end

defimpl Poison.Decoder, for: GoogleApi.Transcoder.V1beta1.Model.JobConfig do
  def decode(value, options) do
    GoogleApi.Transcoder.V1beta1.Model.JobConfig.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Transcoder.V1beta1.Model.JobConfig do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
